/*
 * @Author: liucc
 * @Date: 2020-09-14 15:38:13
 * @LastEditors: liucc
 * @LastEditTime: 2021-01-22 18:53:40
 * @Description: 
 */
'use strict'

const Controller = require('egg').Controller

class StaffController extends Controller {
  async getStaffList() {
    const { ctx } = this
    const resBody = await ctx.service.managerrecord.staff.getStaffList(
      ctx.query
    )
    this.ctx.body = resBody
  }
  async getSingleStaff() {
    const { ctx } = this
    const resBody = await ctx.service.managerrecord.staff.getSingleStaff(
      ctx.params.identitycardid
    )
    this.ctx.body = resBody
  }
  async createStaff() {
    const { ctx } = this
    const resBody = await ctx.service.managerrecord.staff.createStaff(
      ctx.request.body
    )
    ctx.body = resBody
  }
  async createManyStaff() {
    const { ctx } = this
    const resBody = await ctx.service.managerrecord.staff.createManyStaff(
      ctx.request.body
    )
    ctx.body = resBody
  }
  async updateStaff() {
    const { ctx } = this
    const resBody = await ctx.service.managerrecord.staff.updateStaff(
      ctx.request.body,
      ctx.params.id
    )
    ctx.body = resBody
  }
  async deleteStaff() {
    const { ctx } = this
    const resBody = await ctx.service.managerrecord.staff.deleteStaff(
      ctx.params.id
    )
    ctx.body = resBody
  }
}

module.exports = StaffController
